package com.hmsm.dingtalk.openapi;


public class AppConfig {
	
	private final String appId;
	
	private final String appSecret;

	public Token appToken = null;

	public String getAppSecret() {
		return appSecret;
	}

	public String getAppId() {
		return appId;
	}
	
	public AppConfig(String appId, String appSecret){
		this.appId = appId;
		this.appSecret = appSecret;
	}

	public Token getAppToken() {
		return appToken;
	}

	public void setAppToken(Token appToken) {
		this.appToken = appToken;
	}

	public String getAppTokenValue() {
		String appTokenValue = null;
		
		if (appToken!=null){
			appTokenValue = appToken.toString();
		}
		
		return appTokenValue;
	}

	public void setAppToken(String appToken, long expireTime) {
		this.appToken = new Token(appToken, expireTime);
	}
	
}
